When the colors of a captured image are different from the original colors, processing is performed that converts the color of each pixel of the image into the original color. This processing is called color correction. As a method for implementing color correction, there is, for example, a method which captures an image of an imaging object together with a sample containing a known color (hereinafter “reference color”), and converts the color of each pixel into the original color based on a change in the reference color.
However, the pixels of an image may represent a huge number of colors. Therefore, it is difficult to set all the colors that may be represented by the pixels as reference colors, and to provide conversion to the original color for each of the reference colors in advance. Accordingly, in the case of applying the method described above, interpolation processing is performed so as to obtain the color (hereinafter “input color”) of each pixel from a preset reference color. Thus, conversion for the input color is obtained from conversion for the reference color. Then, color correction is performed based on the obtained conversion for the input color.
For example, there is a method that obtains conversion for an input color using volume interpolation. This method sets solids whose vertices are defined by reference colors in a color space, and obtains conversion of an input color using conversion of the reference colors on the vertices of the solid containing the input color. According to this method, the accuracy of color correction increases as the distance between the input color and each reference color used for interpolation processing decreases. In view of the above, as a method for improving the accuracy of color correction, there has been proposed a method that captures an image of a large number of reference colors so as to set a large number of solids in the color space.
There has also been proposed a method that arranges reference colors in a matrix form in a three-dimensional color space, and performs color correction using the reference colors. According to this method, the reference points located on the vertices of each of cubes of the matrix are used for interpolation processing. There has also been proposed a method that specifies a tetrahedron containing an input color, prints a chart for a detailed measurement of the inside of the specified tetrahedron, and corrects the input color based on the results of the color measurement of the printed chart. There has also been proposed a method that determines conversion of an input color based on a reference point located near the input color, without using volume interpolation. There has also been proposed a method that detects the position of a reference color from a captured image containing the reference color, and extracts the color of the reference color from the image.
Examples of the related art are disclosed in:
Japanese Laid-open Patent Publication No. 2000-048179;
Japanese Laid-open Patent Publication No. 02-023776;
Japanese Laid-open Patent Publication No. 2010-045560;
Japanese Laid-open Patent Publication No. 2003-125224; and
International Publication Pamphlet No. WO2013/145295.
In the case of the method that arranges reference colors in a matrix form in a color space, it is possible to uniquely identify a cube containing an input color from the coordinates of the input color in the color space. On the other hand, in the case where reference colors are not arranged in a matrix form, there is freedom in choosing a solid whose vertices are defined by reference colors. In this case, solids to be used for interpolation processing are set in advance, and color correction is performed using the reference colors on the vertices of the solid containing the input color.
The accuracy of color correction depends on the choice of a solid. Further, selecting appropriate vertices (reference colors) for a solid containing the input color imposes a heavy processing load. For example, consider a tetrahedron containing an input color. In this case, if there are N reference colors, then the number of combination of reference colors is of the order of N4. Finding an appropriate combination for interpolation processing from such a large number of combinations imposes a heavy processing load. Accordingly, it takes a long time to perform interpolation processing for all the input colors contained in an image.